﻿using System;

namespace IOA.MES.DataAccess.VModel
{
    /// <summary>
    /// 补片记录
    /// </summary>
    public class VCompenCellRecord : BaseVModel
    {
        private string _workshopCode = string.Empty;
        private string _workshopName = string.Empty;
        private string _orderNo = string.Empty;
        private string _workOrderNo = string.Empty;
        private string _compenDutyName = string.Empty;
        private string _cellCode = string.Empty;
        private string _cellBatchNo = string.Empty;
        private string _cellFactory = string.Empty;
        private string _cellCrystalCategory = string.Empty;
        private string _cellSpecs = string.Empty;

        #region Public Property

        ///<Summary>
        /// WorkshopCode
        ///</Summary>
        public string WorkshopCode
        {
            get { return string.IsNullOrWhiteSpace(_workshopCode) ? string.Empty : _workshopCode; }
            set { _workshopCode = value; }
        }

        ///<Summary>
        /// WorkshopName
        ///</Summary>
        public string WorkshopName
        {
            get { return string.IsNullOrWhiteSpace(_workshopName) ? string.Empty : _workshopName; }
            set { _workshopName = value; }
        }

        ///<Summary>
        /// OrderNo
        ///</Summary>
        public string OrderNo
        {
            get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
            set { _orderNo = value; }
        }

        ///<Summary>
        /// WorkOrderNo
        ///</Summary>
        public string WorkOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_workOrderNo) ? string.Empty : _workOrderNo; }
            set { _workOrderNo = value; }
        }

        ///<Summary>
        /// CompenProcess
        ///</Summary>
        public Enum.CompenProcessType CompenProcess { get; set; }

        ///<Summary>
        /// CompenReason
        ///</Summary>
        public Enum.FragmentType CompenReason { get; set; }

        ///<Summary>
        /// StartTime
        ///</Summary>
        public DateTime StartTime { get; set; }

        ///<Summary>
        /// EndTime
        ///</Summary>
        public DateTime EndTime { get; set; }

        ///<Summary>
        /// CompenDutyId
        ///</Summary>
        public int CompenDutyId { get; set; }

        ///<Summary>
        /// CompenDutyName
        ///</Summary>
        public string CompenDutyName
        {
            get { return string.IsNullOrWhiteSpace(_compenDutyName) ? string.Empty : _compenDutyName; }
            set { _compenDutyName = value; }
        }

        ///<Summary>
        /// CellCount
        ///</Summary>
        public int CellCount { get; set; }

        ///<Summary>
        /// CellCode
        ///</Summary>
        public string CellCode
        {
            get { return string.IsNullOrWhiteSpace(_cellCode) ? string.Empty : _cellCode; }
            set { _cellCode = value; }
        }

        ///<Summary>
        /// CellBatchNo
        ///</Summary>
        public string CellBatchNo
        {
            get { return string.IsNullOrWhiteSpace(_cellBatchNo) ? string.Empty : _cellBatchNo; }
            set { _cellBatchNo = value; }
        }

        ///<Summary>
        /// 电池规格
        ///</Summary>
        public string CellSpecs
        {
            get { return string.IsNullOrWhiteSpace(_cellSpecs) ? string.Empty : _cellSpecs; }
            set { _cellSpecs = value; }
        }

        ///<Summary>
        /// 电池厂家
        ///</Summary>
        public string CellFactory
        {
            get { return string.IsNullOrWhiteSpace(_cellFactory) ? string.Empty : _cellFactory; }
            set { _cellFactory = value; }
        }

        ///<Summary>
        /// 晶体类型
        ///</Summary>
        public string CellCrystalType
        {
            get { return string.IsNullOrWhiteSpace(_cellCrystalCategory) ? string.Empty : _cellCrystalCategory; }
            set { _cellCrystalCategory = value; }
        }

        ///<Summary>
        /// 电池效率
        ///</Summary>
        public decimal? CellEfficiency { get; set; }

        ///<Summary>
        /// 电池面积
        ///</Summary>
        public decimal? CellArea { get; set; }

        ///<Summary>
        /// 电池功率
        ///</Summary>
        public decimal? CellSinglePower { get; set; }
        #endregion

        /// <summary>
        /// 工序
        /// </summary>
        public string CnCompenProcess { get { return EnumConvert.ToDesc(CompenProcess); } }

        /// <summary>
        /// 原因
        /// </summary>
        public string CnCompenReason { get { return EnumConvert.ToDesc(CompenReason); } }

        public string StartTimeStr { get { return StartTime.ToString("yyyy-MM-dd HH:mm:ss"); } }

        public string EndTimeStr { get { return EndTime.ToString("yyyy-MM-dd HH:mm:ss"); } }
    }
}
